﻿using System;
using System.Windows;
using SocialApi.TestApp.Models.Enums;
using SocialApi.TestApp.ViewModels;

namespace SocialApi.TestApp.Views
{
    public partial class ConsoleControl
    {
        public ConsoleControl(string title, SocialType socialType)
        {
            InitializeComponent();
            Title = title;
            Loaded += (sender, args) => DataContext = new ConsoleContolViewModel(Dispatcher, NavigationFrame.NavigationService, socialType, Browser);
        }

        private void OnClosed(object sender, EventArgs e)
        {
            Application.Current.MainWindow.Show();
        }
    }
}